import {customeStruct} from '../utils';
const itf = customeStruct.interface;
export const InitData = itf({
    payload: itf({
        isDealerUser: 'boolean',
        dealerType: 'number? | null'
    })
});

export const List = itf({
    payload: itf({
        content: [itf({
            id: 'string',
            rowVersion: 'string',
            options: ['string']
        })],
        totalElements: 'number'
    })
});

export const Detail = itf({
    payload: itf(
        {
            id: 'string',
            rowVersion: 'string',
            options: ['string'],
            attachments: [itf({
                fileId: 'string',
                fileName: 'string'
            })],
            details: [
                itf({
                    claimId: 'string',
                    claimCode: 'string',
                    usedParts: [
                        itf({
                            usedPartBarCode: 'string? | null',
                        })
                    ],
                
                    
                })
            ],
        },
        
    )
});

export const Claim = itf({
    payload: itf({
        content: [
            itf({
                id: 'string',
                code: 'string',
            })
        ],
        totalElements: 'number'
    })
});

export const ClaimDetails = itf({
    payload: itf({
        content: [
            itf({
                id: 'string',
                code: 'string',
                details: [itf({
                    usedPartBarCode: 'string? | null',
                })]
            })
        ]
    })
});

export const Employee = itf({
    payload: itf({
        content: [
            itf({
                id: 'string',
                code: 'string',
                name: 'string',
                cellPhoneNumber: 'string? | null',
            })
        ],
    })
});

export const Brands = itf({
    payload: itf({
        content: [
            itf({
                id: 'string',
                code: 'string',
                name: 'string',
            })
        ],
    })
});
